import '../../a_yyt/models/dynamic_entity.dart';

/// bean : {"elderName":"王丫丫","bedId":null,"bedNo":null,"recorder":"超级管理员","post":null,"nurseItemName":"今日未见明显异常","isShiftName":"是","serviceAreaName":null,"modify":0,"nurseRecordBackupBeans":[],"delete":null,"customerElderId":"9646","nurseItem":"10000","serviceGroupId":null,"postCode":null,"content":"今日未见明显异常","recorderId":"5","recordTime":"2023-01-13 17:17:11","isShift":1,"notifier":"管理员,福利中心","branchId":"6627","tenantId":"1000","saasId":"1000","deleteStatus":0,"id":"13470","createdBy":"5","createdDate":"2023-01-13 17:17:46","updatedBy":"5","updatedDate":"2023-01-13 17:17:46"}
/// caption : {"nurseItem":"今日未见明显异常"}

class NurseRecordDetailResponse {
  NurseRecordDetailResponse({
    this.bean,
    this.caption,
  });

  NurseRecordDetailResponse.fromJson(dynamic json) {
    bean = json['bean'] != null ? NurseRecordBean.fromJson(json['bean']) : null;
    caption =
        json['caption'] != null ? NurseRecordCaption.fromJson(json['caption']) : null;
  }

  NurseRecordBean? bean;
  NurseRecordCaption? caption;

  NurseRecordDetailResponse copyWith({
    NurseRecordBean? bean,
    NurseRecordCaption? caption,
  }) =>
      NurseRecordDetailResponse(
        bean: bean ?? this.bean,
        caption: caption ?? this.caption,
      );

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (bean != null) {
      map['bean'] = bean?.toJson();
    }
    if (caption != null) {
      map['caption'] = caption?.toJson();
    }
    return map;
  }
}

/// nurseItem : "今日未见明显异常"

class NurseRecordCaption {
  NurseRecordCaption({
    this.nurseItem,
  });

  NurseRecordCaption.fromJson(dynamic json) {
    nurseItem = json['nurseItem'];
  }

  String? nurseItem;

  NurseRecordCaption copyWith({
    String? nurseItem,
  }) =>
      NurseRecordCaption(
        nurseItem: nurseItem ?? this.nurseItem,
      );

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['nurseItem'] = nurseItem;
    return map;
  }
}

/// elderName : "王丫丫"
/// bedId : null
/// bedNo : null
/// recorder : "超级管理员"
/// post : null
/// nurseItemName : "今日未见明显异常"
/// isShiftName : "是"
/// serviceAreaName : null
/// modify : 0
/// nurseRecordBackupBeans : []
/// delete : null
/// customerElderId : "9646"
/// nurseItem : "10000"
/// serviceGroupId : null
/// postCode : null
/// content : "今日未见明显异常"
/// recorderId : "5"
/// recordTime : "2023-01-13 17:17:11"
/// isShift : 1
/// notifier : "管理员,福利中心"
/// branchId : "6627"
/// tenantId : "1000"
/// saasId : "1000"
/// deleteStatus : 0
/// id : "13470"
/// createdBy : "5"
/// createdDate : "2023-01-13 17:17:46"
/// updatedBy : "5"
/// updatedDate : "2023-01-13 17:17:46"

class NurseRecordBean {
  NurseRecordBean({
    this.elderName,
    this.bedId,
    this.bedNo,
    this.recorder,
    this.post,
    this.nurseItemName,
    this.isShiftName,
    this.serviceAreaName,
    this.modify,
    this.nurseRecordBackupBeans,
    this.delete,
    this.customerElderId,
    this.nurseItem,
    this.serviceGroupId,
    this.postCode,
    this.content,
    this.recorderId,
    this.recordTime,
    this.isShift,
    this.notifier,
    this.branchId,
    this.tenantId,
    this.saasId,
    this.deleteStatus,
    this.id,
    this.createdBy,
    this.createdDate,
    this.updatedBy,
    this.updatedDate,
    this.attachList,
  });

  NurseRecordBean.fromJson(dynamic json) {
    elderName = json['elderName'];
    bedId = json['bedId'];
    bedNo = json['bedNo'];
    recorder = json['recorder'];
    post = json['post'];
    nurseItemName = json['nurseItemName'];
    isShiftName = json['isShiftName'];
    serviceAreaName = json['serviceAreaName'];
    modify = json['modify'];
    // if (json['nurseRecordBackupBeans'] != null) {
    //   nurseRecordBackupBeans = [];
    //   json['nurseRecordBackupBeans'].forEach((v) {
    //     nurseRecordBackupBeans.add(Dynamic.fromJson(v));
    //   });
    // }
    delete = json['delete'];
    customerElderId = json['customerElderId'];
    nurseItem = json['nurseItem'];
    serviceGroupId = json['serviceGroupId'];
    postCode = json['postCode'];
    content = json['content'];
    recorderId = json['recorderId'];
    recordTime = json['recordTime'];
    isShift = json['isShift'];
    notifier = json['notifier'];
    notifierIds = json['notifierIds'];
    branchId = json['branchId'];
    tenantId = json['tenantId'];
    saasId = json['saasId'];
    deleteStatus = json['deleteStatus'];
    id = json['id'];
    createdBy = json['createdBy'];
    createdDate = json['createdDate'];
    updatedBy = json['updatedBy'];
    updatedDate = json['updatedDate'];
    final originList1 = json['attachList'] as List;
    if (originList1 != null)
      attachList =
          originList1.map((value) => PictureInfo.fromJson(value)).toList();
  }

  String? elderName;
  dynamic bedId;
  dynamic bedNo;
  String? recorder;
  dynamic post;
  String? nurseItemName;
  String? isShiftName;
  dynamic serviceAreaName;
  num? modify;
  List<dynamic>? nurseRecordBackupBeans;
  dynamic delete;
  String? customerElderId;
  String? nurseItem;
  dynamic serviceGroupId;
  dynamic postCode;
  String? content;
  String? recorderId;
  String? recordTime;
  num? isShift;
  String? notifier;
  String? notifierIds;
  String? branchId;
  String? tenantId;
  String? saasId;
  num? deleteStatus;
  String? id;
  String? createdBy;
  String? createdDate;
  String? updatedBy;
  String? updatedDate;
  List<PictureInfo>? attachList;


  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['elderName'] = elderName;
    map['bedId'] = bedId;
    map['bedNo'] = bedNo;
    map['recorder'] = recorder;
    map['post'] = post;
    map['nurseItemName'] = nurseItemName;
    map['isShiftName'] = isShiftName;
    map['serviceAreaName'] = serviceAreaName;
    map['modify'] = modify;
    if (nurseRecordBackupBeans != null) {
      map['nurseRecordBackupBeans'] =
          nurseRecordBackupBeans?.map((v) => v.toJson()).toList();
    }

    if (attachList != null) {
      map['nurseRecordBackupBeans'] =
          attachList?.map((v) => v.toJson()).toList();
    }
    map['delete'] = delete;
    map['customerElderId'] = customerElderId;
    map['nurseItem'] = nurseItem;
    map['serviceGroupId'] = serviceGroupId;
    map['postCode'] = postCode;
    map['content'] = content;
    map['recorderId'] = recorderId;
    map['recordTime'] = recordTime;
    map['isShift'] = isShift;
    map['notifier'] = notifier;
    map['notifierIds'] = notifierIds;
    map['branchId'] = branchId;
    map['tenantId'] = tenantId;
    map['saasId'] = saasId;
    map['deleteStatus'] = deleteStatus;
    map['id'] = id;
    map['createdBy'] = createdBy;
    map['createdDate'] = createdDate;
    map['updatedBy'] = updatedBy;
    map['updatedDate'] = updatedDate;
    return map;
  }
}
